package no.group.gowther.rest.vo.param;

import javax.validation.constraints.NotNull;
import java.util.Collections;
import java.util.List;

/**
 * @author ayatsuji
 * @date 2022-04-24 22:39
 * @since
 */
public class OnePieceUpdateParam {
    @NotNull(message = "onePieceId不能为空")
    private Long onePieceId;
    private List<Long> tagId;
    private String name;

    public Long getOnePieceId() {
        return onePieceId;
    }

    public void setOnePieceId(Long onePieceId) {
        this.onePieceId = onePieceId;
    }


    public List<Long> getTagId() {
        return tagId;
    }

    public void setTagId(List<Long> tagId) {
        if (tagId == null) {
            this.tagId = Collections.emptyList();
            return;
        }
        this.tagId = tagId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "OnePieceUpdateParam{" +
                "onePieceId=" + onePieceId +
                ", tagId=" + tagId +
                ", name='" + name + '\'' +
                '}';
    }
}
